package com.me.brainlessbirds.actors.zombies.units;

import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.utils.Timer.Task;
import com.me.brainlessbirds.Assets;
import com.me.brainlessbirds.actors.GameObject;
import com.me.brainlessbirds.actors.skills.BaseAttack;
import com.me.brainlessbirds.actors.zombies.Zombie;

public class Winehouse extends Zombie
{
	public static final int	COST	= 30;

	public Winehouse()
	{
		type = ZombieType.WINEHOUSE;
		attack = 4.0f;
		defense = 1.0f;
		life = 3.0f;
		speed = 70.0f;
		rgnIdle = new TextureRegion(Assets.get().textureWinehouse);
		rgnAtk = new TextureRegion(Assets.get().textureWinehouseAtk);

		setSize(64.0f, 64.0f);
		setOrigin(getWidth() / 2, getHeight() / 2);

		BaseAttack _bAttack = new BaseAttack(this.attack, 1f);
		_bAttack.setEffectTaskInit(new Task()
		{

			@Override
			public void run()
			{
				//System.out.println("Base attack of WH");
			}
		});
		this.skillMap.put(BaseAttack.class, _bAttack);
	}

	@Override
	public boolean collideRight(GameObject _go)
	{
		boolean isColliding = super.collideRight(_go);
		if (isColliding)
		{
			_go.OnHitByWinehouse(this);
		}
		return isColliding;
	}
}
